#include <linux/module.h>
#include <linux/init.h>
#include <asm/current.h>
#include <linux/sched.h>

MODULE_LICENSE("GPL");

static int __init init_main(void)
{
 printk(KERN_INFO "The current process is \"%s\" (pid %i)\n", current->comm, current->pid);
 return 0;
}

static void __exit exit_main(void)
{
 printk(KERN_INFO "The current process is \"%s\" (pid %i)\n", current->comm, current->pid);
}

module_init(init_main)
module_exit(exit_main)